package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the per_ema_tm database table.
 * 
 */
@Entity
@Table(name="per_ema_tm")
@NamedQuery(name="PerEmaTm.findAll", query="SELECT p FROM PerEmaTm p")
public class PerEmaTm implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int tmzid;

	private String tmbda;

	private int tmfs;

	private String tmnyd;

	private String tmsub;

	private String tmtype;

	private String tmzsd;

	//bi-directional many-to-one association to PerEmaQsb
	@ManyToOne
	@JoinColumn(name="QSBID")
	private PerEmaQsb perEmaQsb;

	//bi-directional many-to-one association to PerEmaTs
	@OneToMany(mappedBy="perEmaTm")
	private List<PerEmaTs> perEmaTs;

	public PerEmaTm() {
	}

	public int getTmzid() {
		return this.tmzid;
	}

	public void setTmzid(int tmzid) {
		this.tmzid = tmzid;
	}

	public String getTmbda() {
		return this.tmbda;
	}

	public void setTmbda(String tmbda) {
		this.tmbda = tmbda;
	}

	public int getTmfs() {
		return this.tmfs;
	}

	public void setTmfs(int tmfs) {
		this.tmfs = tmfs;
	}

	public String getTmnyd() {
		return this.tmnyd;
	}

	public void setTmnyd(String tmnyd) {
		this.tmnyd = tmnyd;
	}

	public String getTmsub() {
		return this.tmsub;
	}

	public void setTmsub(String tmsub) {
		this.tmsub = tmsub;
	}

	public String getTmtype() {
		return this.tmtype;
	}

	public void setTmtype(String tmtype) {
		this.tmtype = tmtype;
	}

	public String getTmzsd() {
		return this.tmzsd;
	}

	public void setTmzsd(String tmzsd) {
		this.tmzsd = tmzsd;
	}

	public PerEmaQsb getPerEmaQsb() {
		return this.perEmaQsb;
	}

	public void setPerEmaQsb(PerEmaQsb perEmaQsb) {
		this.perEmaQsb = perEmaQsb;
	}

	public List<PerEmaTs> getPerEmaTs() {
		return this.perEmaTs;
	}

	public void setPerEmaTs(List<PerEmaTs> perEmaTs) {
		this.perEmaTs = perEmaTs;
	}

	public PerEmaTs addPerEmaT(PerEmaTs perEmaT) {
		getPerEmaTs().add(perEmaT);
		perEmaT.setPerEmaTm(this);

		return perEmaT;
	}

	public PerEmaTs removePerEmaT(PerEmaTs perEmaT) {
		getPerEmaTs().remove(perEmaT);
		perEmaT.setPerEmaTm(null);

		return perEmaT;
	}

}